package easytalk.connectivity.offline;

import common.BodySet;
import common.DiscussionSentence;
import common.Locutor;

import connection.AbstarctServerConnection;
import connection.ServerType;

public class OfflineServer extends AbstarctServerConnection {

	@Override
	public void hookBodySet(BodySet set) throws Exception {

		Locutor locutor;

		for (int i = 0; i < 10; i++) {
			locutor = set.createLocutor(Messages.getString("OfflineServer.0") + i); //$NON-NLS-1$
			locutor.setName(Messages.getString("OfflineServer.1") + i); //$NON-NLS-1$
		}

	}

	@Override
	public boolean login(String username, String password) throws Exception {
		
		this.config.setServerType(ServerType.OFFILNE);
		this.config.setUserName(username);
		this.config.setPassword(password);
		return true;

	}

	@Override
	public void logout() {
		// TODO Auto-generated method stub

	}

	@Override
	public String getName() {
		return Messages.getString("OfflineServer.2"); //$NON-NLS-1$
	}

	@Override
	public void createChat(String id) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void sendMessage(String id, DiscussionSentence sentence) {
		// TODO Auto-generated method stub
		
	}


}
